import Home from '@/components/Home'
import ItemSearch from '@/components/item/ItemSearch'
import SaleSearch from '@/components/sale/SaleSearch'
import Charts from '@/components/report/Charts'
import UserManage from '@/components/system/UserManage'
import ChangeInfo from '@/components/system/ChangeInfo'
import InventorySearch from '@/components/inventory/InventorySearch'
import Login from '@/components/Login'
import AddItem from '@/components/inventory/AddItem'


export default [

    {
      path: '/',
      component:Login
    },
    {//配置主页路由,存在子路由
      path: '/home',
      name:'home',
      component: Home,
      children:[
        {
          path:'/home/',
          redirect:'/home/itemSearch',
          component:ItemSearch,
          children:[{
            path:'/home/itemSearch/'
          }]
        },
        {
          path:'/home/itemSearch',
          name:'itemSearch',
          component:ItemSearch
        },{
          path:'/home/saleSearch',
          component:SaleSearch
        },{
          path:'/home/charts',
          component:Charts
        },{
          path:'/home/userManage',
          component:UserManage
        },{
          path:'/home/changeInfo',
          component:ChangeInfo
        },{
          path:'/home/inventorySearch',
          component:InventorySearch
        },{
          path:"/home/addItem",
          component:AddItem
        }
      ]
    },

]
